Expand description
Pure Rust implementation of the Camellia block cipher.
§⚠️ Security Warning: Hazmat!
This crate implements only the low-level block cipher function, and is intended for use for implementing higher-level constructions only. It is NOT intended for direct use in applications.
USE AT YOUR OWN RISK!
§Examples
use camellia::cipher::generic_array::GenericArray;
use camellia::cipher::{BlockDecrypt, BlockEncrypt, KeyInit};
use camellia::Camellia128;
let key = GenericArray::from([0_u8; 16]);
let mut block = GenericArray::from([0_u8; 16]);
// Initialize cipher
let cipher = Camellia128::new(&key);
let block_copy = block;
// Encrypt block in-place
cipher.encrypt_block(&mut block);
// And decrypt it back
cipher.decrypt_block(&mut block);
assert_eq!(block, block_copy);
Re-exports§
pub use cipher;
Structs§
- Camellia-128 block cipher instance.
- Camellia-192 block cipher instance.
- Camellia-256 block cipher instance.